#find_package(ZLIB REQUIRED)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")

file(GLOB fntshared_SRCS
	"graph.*"
	"stream.*"
	"image.cc"
	"image.reader.cc*"
	)

add_library(fntshared STATIC ${fntshared_SRCS})
target_link_libraries(fntshared ${ZLIB_LIBRARIES})
target_link_libraries(fntshared ${CURL_LIBRARIES} ${TIFF_LIBRARIES})
target_include_directories(fntshared SYSTEM PUBLIC ${ZLIB_INCLUDE_DIR})
target_include_directories(fntshared SYSTEM PUBLIC ${TIFF_INCLUDE_DIR})

if(WITH_VP9)
	if(USE_PRIV_WEBM)
		add_dependencies(fntshared priv-webm)
	endif()
	if(USE_PRIV_VPX)
		add_dependencies(fntshared priv-vpx)
	endif()
	target_include_directories(fntshared SYSTEM BEFORE PUBLIC
		${WEBM_INCLUDE_DIRS} ${VPX_INCLUDE_DIRS})
endif()
if(WITH_HEVC)
	add_dependencies(fntshared priv-hevc)
	target_include_directories(fntshared SYSTEM BEFORE PUBLIC
		${HEVC_INCLUDE_DIRS} ${HEVC_INCLUDE_DIRS})
endif()
